package com.torry.edss.integration.feign.eastmoney;


import com.torry.edss.integration.feign.eastmoney.response.EMDailyLineResponse;
import com.torry.edss.integration.feign.eastmoney.response.EMIndexFundFlowResponse;
import feign.CollectionFormat;
import feign.Headers;
import feign.Param;
import feign.RequestLine;


/**
 * @author Administrator
 */
public interface EastMoneyPush2HisFeignClient {

    @RequestLine(value = "GET /api/qt/stock/kline/get?" +
            "secid={code}" +
            "&ut=fa5fd1943c7b386f172d6893dbfba10b" +
            "&fields1=f1,f2,f3,f4,f5,f6" +
            "&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61" +
            "&klt=101" +
            "&fqt=1" +
            "&end=20500101" +
            "&lmt={limit}", collectionFormat=CollectionFormat.CSV
    )
    /**
     * 拉取日线级别K线数据，包含交易日当日
     */
    EMDailyLineResponse fetchRealTimeDailyLines(@Param(value = "code") String code, @Param(value = "limit") Integer limit);

    @RequestLine(value = "GET api/qt/stock/fflow/daykline/get?" +
            "lmt=0" +
            "&klt=101" +
            "&fields1=f1,f2,f3,f7" +
            "&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64,f65" +
            "&ut=b2884a393a59ad64002292a3e90d46a5" +
            "&secid=1.000001&secid2=0.399001", collectionFormat=CollectionFormat.CSV)
    @Headers({"Content-Type: application/json"})
    /**
     * 拉取指数资金流数据
     */
    EMIndexFundFlowResponse fetchFundFlows();
}
